<template>
    <div class="swiper">
      <swiper :options="swiperOption">
        <swiper-slide v-for="item in swiper" :key="item.id"><img :src="item.imgUrl" :alt="item.alt"></swiper-slide>
        <!-- 分页器 -->
        <div class="swiper-pagination"  slot="pagination"></div>
      </swiper>
    </div>
</template>

<script>
    export default {
      props:["swiper"],
      data() {
        return {
          swiperOption: {
            loop: true,
            autoplay: {
              delay: 3000,
              stopOnLastSlide: true,
              disableOnInteraction: false,
            },
            pagination: {
              el: '.swiper-pagination',
            },
          }
        }
      },
    }
</script>

<style scoped lang="less">
  @import "./../../../assets/css/myless.css";
</style>
